< previous page page_97 next page >

Page 97
The Image property specifies the index of the picture you want to appear on the face of the button. The index corresponds to the index of the picture in the ImageList control. A value of zero for the Image property will give you a button lacking an image.
The Style property determines the type of button that you're creating. The button type also determines how the button will behave in the toolbar. Table 4.1 lists the different Style property settings.
TABLE 4.1. SETTING THE BUTTON BEHAVIOR WITH THEStylePROPERTY.
SettingConstant NameDescription
0tbrDefaultCreates a standard push button.
1tbrCheckIndicates that an option is on or off.
2tbrButtonGroupPart of a group; only one button of the group may be selected at a time.
3tbrSeparatorProvides a space between other buttons.
4tbrPlaceHolderUsed to hold a space in the toolbar for other controls such as a combo box.
5tbrDropDownDisplays a dropdown menu list when the button is clicked.

Also, you can set several optional properties for each button:
Caption displays text beneath the picture on a button.
Description describes the button to users when they use the Customize Toolbar dialog box.
ToolTipText is text that appears when the mouse is placed on the button. (This text appears only if the ShowTips property of the toolbar is set to True.)
Value sets or returns the current state of the button.
If you set a button style property to tbrDropDown, you will then need to set the menu item for that button on the button property page as shown in Figure 4.4.
This new feature of the toolbar gives you the functionality that is included in Visual Basic (see Figure 4.5) as well as many other Microsoft products.

 
< previous page page_97 next page >

If you like this book, buy it!